Resource URL: /platform/<<version=3>>/event/channels/<ID>

    Overview: This resource applies the standard collection pattern to
              individual channels.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve the channel.

       URL: GET /platform/<<version=3>>/event/channels/<ID>

There are no query arguments for this method.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "channels": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "Named channel through which alerts can be delivered.", 
            "properties": {
              "name": {
                "type": "string", 
                "description": "Channel name,  may not contain /, max length 254."
              }, 
              "parameters": {
                "type": [
                  {
                    "type": "object", 
                    "description": "Parameters to be used for an smtp channel", 
                    "properties": {
                      "smtp_use_auth": {
                        "type": "boolean", 
                        "description": "Use SMTP authentication - optional defaulst to false."
                      }, 
                      "smtp_password": {
                        "type": "string", 
                        "description": "Password for SMTP authentication - only if smtp_use_auth true."
                      }, 
                      "smtp_port": {
                        "type": "integer", 
                        "description": "SMTP relay port - optional defaults to 25."
                      }, 
                      "smtp_host": {
                        "type": "string", 
                        "description": "SMTP relay host."
                      }, 
                      "custom_template": {
                        "type": "string", 
                        "description": "Path to custom notification template."
                      }, 
                      "batch": {
                        "enum": [
                          "NONE", 
                          "ALL", 
                          "CATEGORY", 
                          "SEVERITY"
                        ], 
                        "type": "string", 
                        "description": "Batching criterion."
                      }, 
                      "batch_period": {
                        "type": "integer", 
                        "description": "Period over which batching is to be performed."
                      }, 
                      "send_as": {
                        "type": "string", 
                        "description": "Email address to use as from."
                      }, 
                      "smtp_security": {
                        "enum": [
                          "NONE", 
                          "STARTTLS"
                        ], 
                        "type": "string", 
                        "description": "Encryption protocol to use for SMTP."
                      }, 
                      "address": {
                        "items": {
                          "type": "string"
                        }, 
                        "type": "array", 
                        "description": "Email addresses to send to."
                      }, 
                      "smtp_username": {
                        "type": "string", 
                        "description": "Username for SMTP authentication - only if smtp_use_auth true."
                      }, 
                      "subject": {
                        "type": "string", 
                        "description": "Subject for emails."
                      }
                    }
                  }, 
                  {
                    "type": "object", 
                    "description": "Parameters to be used for an snmp channel", 
                    "properties": {
                      "host": {
                        "type": "string", 
                        "description": "Destination for SNMP trap."
                      }, 
                      "community": {
                        "type": "string", 
                        "description": "Optional defaults to 'public'."
                      }, 
                      "use_snmp_trap": {
                        "type": "boolean", 
                        "description": "Use snmptrap instead of snmpinform."
                      }
                    }
                  }
                ], 
                "description": "A collection of parameters dependent on the channel type"
              }, 
              "allowed_nodes": {
                "items": {
                  "type": "integer"
                }, 
                "type": "array", 
                "description": "Nodes (LNNs) that can be masters for this channel"
              }, 
              "enabled": {
                "type": "boolean", 
                "description": "Channel is to be used or not"
              }, 
              "system": {
                "type": "boolean", 
                "description": "Channel is a pre-defined system channel"
              }, 
              "excluded_nodes": {
                "items": {
                  "type": "integer"
                }, 
                "type": "array", 
                "description": "Nodes (LNNs) that can NOT be the masters for this channel"
              }, 
              "type": {
                "enum": [
                  "connectemc", 
                  "smtp", 
                  "snmp", 
                  "heartbeat"
                ], 
                "type": "string", 
                "description": "The mechanism used by the channel"
              }, 
              "id": {
                "type": "integer", 
                "description": "Unique identifier."
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: Modify the channel.

       URL: PUT /platform/<<version=3>>/event/channels/<ID>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "description": "Named channel through which alerts can be delivered.", 
  "properties": {
    "parameters": {
      "type": [
        {
          "type": "object", 
          "description": "Parameters to be used for an smtp channel", 
          "properties": {
            "smtp_use_auth": {
              "type": "boolean", 
              "description": "Use SMTP authentication - optional defaulst to false."
            }, 
            "smtp_password": {
              "type": "string", 
              "description": "Password for SMTP authentication - only if smtp_use_auth true."
            }, 
            "smtp_port": {
              "type": "integer", 
              "description": "SMTP relay port - optional defaults to 25."
            }, 
            "smtp_host": {
              "type": "string", 
              "description": "SMTP relay host."
            }, 
            "custom_template": {
              "type": "string", 
              "description": "Path to custom notification template."
            }, 
            "batch": {
              "enum": [
                "NONE", 
                "ALL", 
                "CATEGORY", 
                "SEVERITY"
              ], 
              "type": "string", 
              "description": "Batching criterion."
            }, 
            "batch_period": {
              "type": "integer", 
              "description": "Period over which batching is to be performed."
            }, 
            "send_as": {
              "type": "string", 
              "description": "Email address to use as from."
            }, 
            "smtp_security": {
              "enum": [
                "NONE", 
                "STARTTLS"
              ], 
              "type": "string", 
              "description": "Encryption protocol to use for SMTP."
            }, 
            "address": {
              "items": {
                "type": "string"
              }, 
              "type": "array", 
              "description": "Email addresses to send to."
            }, 
            "smtp_username": {
              "type": "string", 
              "description": "Username for SMTP authentication - only if smtp_use_auth true."
            }, 
            "subject": {
              "type": "string", 
              "description": "Subject for emails."
            }
          }
        }, 
        {
          "type": "object", 
          "description": "Parameters to be used for an snmp channel", 
          "properties": {
            "host": {
              "type": "string", 
              "description": "Destination for SNMP trap."
            }, 
            "community": {
              "type": "string", 
              "description": "Optional defaults to 'public'."
            }, 
            "use_snmp_trap": {
              "type": "boolean", 
              "description": "Use snmptrap instead of snmpinform."
            }
          }
        }
      ], 
      "description": "A collection of parameters dependent on the channel type"
    }, 
    "allowed_nodes": {
      "items": {
        "type": "integer"
      }, 
      "type": "array", 
      "description": "Nodes (LNNs) that can be masters for this channel"
    }, 
    "enabled": {
      "type": "boolean", 
      "description": "Channel is to be used or not"
    }, 
    "system": {
      "type": "boolean", 
      "description": "Channel is a pre-defined system channel"
    }, 
    "excluded_nodes": {
      "items": {
        "type": "integer"
      }, 
      "type": "array", 
      "description": "Nodes (LNNs) that can NOT be the masters for this channel"
    }, 
    "type": {
      "enum": [
        "connectemc", 
        "smtp", 
        "snmp", 
        "heartbeat"
      ], 
      "type": "string", 
      "description": "The mechanism used by the channel"
    }
  }
}

There is no JSON response body for this method.

********************************************************************************

Method DELETE: Delete the channel.

          URL: DELETE /platform/<<version=3>>/event/channels/<ID>

There are no query arguments for this method.

There is no JSON response body for this method.
